<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>QPlus Push PHP demo</title>
</head>

<body>
<pre>
<?php
/*************************************
* 从用户的输入和数据库中，提取必须的参数，
**************************************/
require_once("qplus_push.php");
$APPID = @$_POST["APPID"];
$QPLUSID = @$_POST["QPLUSID"];
$INSTANCEID = @$_POST["INSTANCEID"];
$OPTYPE = @$_POST["OPTYPE"];
$NUM = @$_POST["NUM"];
$TEXT = @$_POST["TEXT"];
$APPCUSTOMIZE = @$_POST["APPCUSTOMIZE"];
$PUSHMSGID = @$_POST["PUSHMSGID"];
if(get_magic_quotes_gpc()==1)
{
	$TEXT = stripcslashes($TEXT);
}



echo("各主要参数如下" . "\n");
$qplus_push  = new QPlusPush($APPID,"THKHjgHZRFeHzF7O");//THKHjgHZRFeHzF7O代表申请的app_secret
$params = array();
$params["QPLUSID"] = $QPLUSID;
$params["INSTANCEID"] = $INSTANCEID;
$params["PUSHMSGID"] = $PUSHMSGID;
$params["OPTYPE"] = $OPTYPE;
$params["NUM"] = $NUM;
$params["TEXT"] = $TEXT;
$params["APPCUSTOMIZE"] = $APPCUSTOMIZE;
var_dump($params);
echo("后台返回内容" . "\n\n");
$result = $qplus_push->push($params);
var_dump($result);
?>
</pre>
</body>
</html>
